import { Application } from 'egg';
// import {
//   indexRule,
// } from '../validate/shop/qr';

/**
 * 统计相关接口
 */
export default (app: Application) => {
  const { auth } = app.middleware;
  const { jwt } = app;

  return {
    'statistics.shop.business': {
      method: 'GET',
      path: '/api/statistics/shop/business',
      options: {
        tags: ['statistics/shop'],
        description: '商家营业额信息',
        handler: app.controller.statistics.shop.business,
        middlewares: [jwt, auth('statistics.shop.business')],
      },
    },
  };
};
